<html xmlns="http://www.w3.org/1999/xhtml"><head><style type="text/css">
dt {
  font-style: italic;
  margin-top: 15px;
  margin-bottom: 3px;
  margin-left: 0px;
  border-bottom: 1px dotted black;
}
dd {
  margin-left: 10px;
}
table {
  border-collapse:collapse;
  border: 1px solid black;
  margin-top: 7px;
}
th {
  border: 1px solid black;
  padding: 3 7 3 7;
}
td {
  border: 1px solid black;
  padding: 3 7 3 7;
}
</style></head><body><p><a name="iload"></a><b>iload</b> :
  retrieve integer from local variable : <a href="opcodes.html">index</a> : <a href="http://asm.objectweb.org/asm40/javadoc/user/org/objectweb/asm/MethodVisitor.html#visitVarInsn(int,%20int)">visitVarInsn()</a></p><dl><dt>Description</dt><dd>Pushes the int value held in a local variable onto the operand stack.
The iload instruction takes a single parameter, &lt;varnum&gt;, an
unsigned integer which indicates which local variable to use. The single-word
int value held in that local variable is retrieved and placed on the stack.
&lt;varnum&gt; must be a valid local variable number in the current method's
frame.</dd><dt>Example</dt><dd><pre>
bipush 5        ; push 5 onto the stack
istore 1        ; pop 5 off of the stack and store in local variable 1
iload 1         ; push the int in local variable 1 (the value 5)
                ; back onto the stack
</pre></dd><dt>See also</dt><dd><a href="ref-aload.html">aload</a> <a href="ref-.html"></a> <a href="ref-fload.html">fload</a> <a href="ref-.html"></a> <a href="ref-lload.html">lload</a> <a href="ref-.html"></a> <a href="ref-dload.html">dload</a> <a href="ref-.html"></a> <a href="ref-astore.html">astore</a> <a href="ref-.html"></a> <a href="ref-fstore.html">fstore</a> <a href="ref-.html"></a> <a href="ref-lstore.html">lstore</a> <a href="ref-.html"></a> <a href="ref-dstore.html">dstore</a> <a href="ref-.html"></a> <a href="ref-istore.html">istore</a> </dd><dt>Stack</dt><dd><table xmlns="">
<tr>
<td>
<b>Before </b>
</td>
<td><b>After</b></td></tr>
<tr>
<td>...</td>
<td>int-value</td></tr>
<tr>
<td></td>
<td>...</td></tr>
</table></dd><dt>Bytecode</dt><dd><table xmlns="">
<tr>
<td>
<b> Type </b>
</td>
<td><b>Description</b></td></tr>
<tr>
<td>
u1 
</td>
<td>iload
opcode = 0x15 (21)
</td></tr>
<tr>
<td>
u1
</td>
<td>&lt;varnum&gt;</td></tr>
</table>
There
is also a wide format for this instruction, which supports access to
all local variables from 0 to 65535:
<table xmlns="">
<tr>
<td>
<b> Type </b>
</td>
<td><b>Description</b></td></tr>
<tr>
<td>u1</td>
<td>wide
opcode = 0xC4 (196)
</td></tr>
<tr>
<td>
u1 
</td>
<td>iload
opcode = 0x15 (21)
</td></tr>
<tr>
<td>
u2 
</td>
<td>&lt;varnum&gt;</td></tr>
</table></dd></dl></body></html>